package com.yst.sqlbuilder;

import com.yst.lambda.LambdaFuncUtils;
import com.yst.lambda.TableFieldFunc;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class SQLParam<T> implements IExpression {
    private String paramName;
    private T value;
    @Override
    public String generateExpression(GenerateParam param) {
        param.namedParams.put(paramName,value);
        return String.format("#[:%s]",paramName);
    }

}
